﻿@model MiniBottles.Models.DictCategory


@{
    var action = ViewContext.RouteData.Values["Action"];

    
}

<div class="fieldset">

         <div class="editor-label">
            @Html.LabelFor(model => model.DictCollection)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.DictCollection.Id, new SelectList(ViewBag.Collections, "Id", "Name"))
            @Html.ValidationMessageFor(model => model.DictCollection)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
         <label>Miniaturka </label>
        </div>
        @if (ViewBag.ImageRequied !=null && ViewBag.ImageRequied)
        {
              <input type="file" data-val="true"  name="file"  data-val-required='Wybierz jakiś plik'  accept="image/jpeg,image/png,jpg|png" />
               @Html.ValidationMessage("file")
           
        }
        else
        {
            <input type="file"  name="file"  accept="image/jpeg,image/png,jpg|png" />
        }
       

    <div class="clear"></div>
        @if (!string.IsNullOrEmpty(Model.FileName)) 
        {
            <a href="~/Upload/big/@Model.FileName" rel="lightbox[roadtrip]" title="@Model.Name">
                <img  src="~/Upload/mini/@Model.FileName" />

            </a>
        }

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.CreateDate)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.CreateDate,"DateTimePicker")
            @Html.HiddenFor(model => model.CreateDate)
            
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UpdateDate)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.UpdateDate,"DateTimePicker")
            @Html.HiddenFor(model => model.UpdateDate)
           
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsActive)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsActive)
            @Html.ValidationMessageFor(model => model.IsActive)
        </div>

        
    

    </div>